// 手机验证码
export const VERIFY_CODE = /^\d{6}$/

// 身份证号
export const ID_CARD = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/

// 军官证
export const OFFICER_CARD = /^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,8})(号?)$/

// 护照
export const PASSPORT = /^([a-zA-z]|[0-9]){5,17}$/

// 港澳居民来往内地通行证
export const PERMIT_HK_MACAO = /^([A-Z]\d{6,10}(\(\w{1}\))?)$/

// 台湾居民来往大陆通行证
export const PERMIT_TAIWAN = /^\d{8}|^[a-zA-Z0-9]{10}|^\d{18}$/

// 密码强度(包含特殊字符),密码强度正则，8-20位，包括至少1个大写字母，1个小写字母，1个数字，1个特殊字符。
export const PASSWORD = /^.*(?=.{8,20})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$/

// 域名 包含http
export const DOMAIN_HTTP = /^((https?|ftp|file):\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/

// 域名
export const DOMAIN_NO_HTTP = /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/

// Mac地址匹配
export const MAC_SITE = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/

// 端口号
export const PORT = /^((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$/

// IPv4 地址
export const IPV4 = /(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/

// IPv6
export const IPV6 = /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/

// 汉字中文,不限制文字长度
export const CHINESE_CHARACTER = /^[\u4e00-\u9fa5]{0,}$/

// 手机号码
export const MOBILE_NUM = /^1\d{10}$/

// Email
export const EMAIL = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,20})$/

//  传真号码
export const FAX = /^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/

// 中国邮政编码
export const POSTAL_CODE = /[1-9]\d{5}(?!\d)/

// 小数点后几位,精确到 2 位小数
export const DECIMAL_FIX2 = /^(0|[1-9]\d*)(.[0-9]{2})$/

// 小数
export const DECIMAL = /^\d+\.\d+$/

// 正整数
export const POSITIVE_INTEGER = /[0-9]*[1-9][0-9]*/

// 负整数
export const NEGATIVE_INTEGER = /-[0-9]*[1-9][0-9]*/

// 整数
export const INTEGER = /-?\d+/

// 非负整数(正整数或零)
export const NON_NEGATIVE_INTEGER = /\d+/

// 车牌号，包含新能源
export const PLATE_NUM = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](?:((\d{5}[A-HJK])|([A-HJK][A-HJ-NP-Z0-9][0-9]{4}))|[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳])$/
